package edu.kjxy.worker0322;

public class worker13 {

	public static void main(String[] args) {
		int row = 10;
		int[][] arr = new int[row][];
		int cnt = 1;
		for (int i = 0; i < arr.length; i++) {
			arr[i] = new int[arr.length - i];
			int x = i;
			int y = 0;
			while(x <= i && y <= i) {
				if(i % 2 != 0) arr[x][y] = cnt++;
				else arr[y][x] = cnt++;
				x--;
				y++;
			}
		}
		for (int i = 0; i < arr.length; i++) {
			for (int j = 0; j < arr[i].length; j++) {
				System.out.print(arr[i][j] + " ");
			}
			System.out.println();
		}
	}

}
